import dt from '@dt/dt'
import server from '@dt/server/dt'

const api = {
  list: server.api().post('/dt-building/data/filingList/collect'),
  export: server.api().post('/dt-building/data/filingList/collectExport').tag('downloadCenter')
}

function list(data) {
  data.pageNum = data.page
  data.pageSize = data.rows
  return api.list.fetch(data).then((res) => {
    res.list = res.records
    return res
  })
}

function exportList(data) {
  return api.export.fetch(data)
}

export default {
  list,
  exportList
}
